﻿using System;
using System.Collections.Generic;
using System.Text;

namespace IceDog.DNL.CSharp.DesignPattern.CommandPattern.StockMarket
{
    public class OrderBuyStock:IOrder
    {
        private readonly Stock _stock;
        public OrderBuyStock(Stock stock)
        {
            _stock = stock;
        }

        /// <inheritdoc cref="IOrder.Execute"/>
        public void Execute()
        {
            _stock.Buy();
        }
    }
}
